package com.wn.class30.cotroller.houtai;

import com.wn.class30.entity.Orderdeploy;
import com.wn.class30.service.OrderDeployService;
import com.wn.class30.tools.Result;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 订单配置
 */
@RestController
@Slf4j
public class OrderDeployController {

    @Resource
    private OrderDeployService orderDeployService;

    @RequestMapping("/houtai/page/deploy/orderdeploy/list")
    @RequiresPermissions("/houtai/page/deploy/orderdeploy/list")
    public Result selectOderdeploys(){
        List<Orderdeploy> orderdeploys = orderDeployService.selectOrderdeploy();
        return new Result("200","success",null,orderdeploys);
    }

    @RequestMapping("/houtai/page/deploy/orderdeploy/update")
    @RequiresPermissions("/houtai/page/deploy/orderdeploy/update")
    public Result updateOderdeploys(Orderdeploy orderdeploy){
        orderDeployService.updateByPrimaryKeySelective(orderdeploy);
        return new Result("200","success",null,null);
    }
}
